import java.io.File;

/**
 * User: rmikhaylenko mirusnet@gmail.com
 * Date: 30/05/13
 * Time: 16:49
 */
public class MplayerLine {

    public static String getFilePath(String line) {
        String[] fields = line.split("[|]+");
        return fields[0];
    }

    public static String getExecLine(String line) {
        String[] fields = line.split("[|]+");
        String[] seconds = fields[1].split("[=]+");
        return "mplayer -slave -quiet -fs -ss " + seconds[1] + " " + "\"" + fields[0] + "\"";
    }

    public static String getShortFileInfo(String line) {
        String[] fields = line.split("[|]+");
        File f = new File(fields[0]);
        return f.getParentFile().getName() + "\t\t\t" + f.getName();

    }
}
